package cn.neusoft.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.UUID;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Order {

    private String orderId;//订单号

    private String orderType;//订单类型
    private String orderStatus;//订单状态


    private String deliverAddress;//投递地址
//    private Customer orderCustomer;//订购人信息
//    private Customer consignee;//收货人信息

    private String customerName;
    private String customerPhone;
    private String consigneeName;
    private String consigneePhone;
    private String consigneeAddress;


//    private Product productInfo;//商品信息
    private String productId;
    private String productName;
    private Integer productNum;//商品数量
    private Integer productPrice;
    private String tip;//备注信息
//    private enum orderType{
//        新订,退订,退货,换货;
//    }
//
//    private enum  orderStatus{
//        可分配,缺货,无效,已领货;
//    }

    /*
    此处暂定，因为涉及其他子模块
     */
    public void OrderCreate(){
        this.orderId = getUUID();
        this.orderStatus = "可分配"; //这个到时候应该是从客服中心传过来的
        this.orderType = "新订"; //这个到时候应该是从客服那边传过来的,根据用户要求进行设置
    }

    public static String getUUID(){
        UUID uuid=UUID.randomUUID();
        String str = uuid.toString();
        String uuidStr=str.replace("-", "");
        return uuidStr;
    }

}
